package com.lan;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

@Configuration
@EnableWebMvc
@SpringBootApplication
public class App implements ServletContextInitializer, WebMvcConfigurer {

    public static void main(String[] args) {
//      System.setProperty("spring.devtools.restart.enabled", "false");
        ConfigurableApplicationContext context = SpringApplication.run(App.class, args);
        ConfigurableEnvironment environment = context.getEnvironment();
    }


    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
    }
}
